Optimal. Leaf size=122 \[ -\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}+\frac {3 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3502, 3490, 3489, 206} \[ -\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}+\frac {3 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3489
Rule 3490
Rule 3502
Rubi steps
\begin {align*} \int \frac {\cos (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx &=\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}+\frac {3 \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx}{4 a}\\ &=\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {3}{8} \int \frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx\\ &=\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}+\frac {(3 i) \operatorname {Subst}\left (\int \frac {1}{2-a x^2} \, dx,x,\frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}\\ &=\frac {3 i \tanh ^{-1}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{4 \sqrt {2} \sqrt {a} d}+\frac {i \cos (c+d x)}{2 d \sqrt {a+i a \tan (c+d x)}}-\frac {3 i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.55, size = 96, normalized size = 0.79 \[ \frac {\sec (c+d x) \left (3 i \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )-i (3 i \sin (2 (c+d x))+\cos (2 (c+d x))+1)\right )}{8 d \sqrt {a+i a \tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.68, size = 245, normalized size = 2.01 \[ \frac {{\left (3 i \, \sqrt {\frac {1}{2}} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (\frac {{\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (6 i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + 6 i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} + 6 i\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, d}\right ) - 3 i \, \sqrt {\frac {1}{2}} a d \sqrt {\frac {1}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (\frac {{\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (-6 i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - 6 i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {1}{a d^{2}}} + 6 i\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, d}\right ) + \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (-2 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{8 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (d x + c\right )}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.15, size = 319, normalized size = 2.61 \[ \frac {\sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (3 i \cos \left (d x +c \right ) \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+8 i \left (\cos ^{3}\left (d x +c \right )\right )+3 i \sqrt {2}\, \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+3 \sqrt {2}\, \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\left (i \cos \left (d x +c \right )-i+\sin \left (d x +c \right )\right ) \sqrt {2}}{2 \sin \left (d x +c \right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+8 \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-12 i \cos \left (d x +c \right )\right )}{16 d a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.27, size = 837, normalized size = 6.86 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (c+d\,x\right )}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________